package com.itlong.cloud.propertyapp.resource;

import com.itlong.cloud.POJO.DTO.app.property.app.PropertyAppDeviceInfoDTO;
import com.itlong.cloud.app.service.IAppDeviceService;
import com.itlong.cloud.propertyapp.service.IPropertyAppDeviceService;
import com.itlong.cloud.user.propertyapp.IPropertyAppDeviceInfoServiceClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * <desc>
 *      物业APP设备信息业务处理暴露接口实现类
 * </desc>
 *
 * @createDate 2020/01/13
 */
@RestController
public class PropertyAppDeviceServiceResource implements IPropertyAppDeviceInfoServiceClient {
    @Autowired
    IPropertyAppDeviceService iPropertyAppDeviceService;

    /**
     * <desc>
     *      物业APP用户获取设备列表
     * <desc/>
     *
     * @param propertyAppDeviceInfoDTO 获取用户设备信息相关参数
     * @return
     * @author Juguang.S
     * @createDate 2020-01-13
     */
    @RequestMapping(value = "/pass/getDeviceList",method = RequestMethod.POST)
    public Map<String, Object> getDeviceList(@RequestBody PropertyAppDeviceInfoDTO propertyAppDeviceInfoDTO) throws Exception{
        return iPropertyAppDeviceService.getDeviceList(propertyAppDeviceInfoDTO);
    }

}
